package com.water.control.util;

import android.text.TextUtils;
import android.widget.Toast;

import com.water.control.App;


public class ToastUtil {
    private static Toast toast;

    public static void show(CharSequence message) {
        if (TextUtils.isEmpty(message)) {
            return;
        }
        if (toast == null) {
            toast = Toast.makeText(App.getInstance(), message, Toast.LENGTH_SHORT);
        } else {
            toast.setDuration(Toast.LENGTH_SHORT);
            toast.setText(message);
        }
        toast.show();
    }
}
